<?php
require_once BACKGROUND_PC_COMMON_ACTION_DIR . '/ajax.php';

class background_pc_index_logout_action extends background_pc_ajax_common_action
{    
    protected $_if_require_login = false;
    
    protected function _current_page_run()
    {
        //var_dump(__METHOD__); exit();
        
        $background_index_logout_action_service = wwy_resource_container::get_background_index_logout_action_service();
        $background_index_logout_action_service->process();

        unset($_SESSION['admin_user_name']);

        $login_url = $this->get_url(array('route' => 'pc_background_index_login'), true);
        echo '<script type="text/javascript">window.top.location.replace("'. $login_url . '");</script>';
    }
}